package org.jeecg.modules.system.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.system.entity.ZkWorkBook;
import org.jeecg.modules.system.entity.ZkWorkBookData;
import org.jeecg.modules.system.mapper.ZkWorkBookMapper;
import org.jeecg.modules.system.service.IZkWorkBookService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: 作业指导书
 * @Author: jeecg-boot
 * @Date:   2024-07-01
 * @Version: V1.0
 */
@Service
public class ZkWorkBookServiceImpl extends ServiceImpl<ZkWorkBookMapper, ZkWorkBook> implements IZkWorkBookService {

    /**
     * 查询全部作业指导书
     */
    @Override
    public List<ZkWorkBookData> queryZkWorkBook(String level,String customName,String proces,String productNumber,String productName) {
        return this.baseMapper.queryZkWorkBook(level,customName,proces,productNumber,productName);
    }

    /**
     * 分页查询
     * @param page
     * @param zkWorkBookData
     * @return
     */
    @Override
    public IPage<ZkWorkBookData> queryZkWorkBookData(Page<ZkWorkBookData> page, ZkWorkBookData zkWorkBookData) {
        return page.setRecords(this.baseMapper.queryZkWorkBookData(page,zkWorkBookData));
    }

    //查询客户名称
    @Override
    public List<String> queryCustomName() {
        return this.baseMapper.customName();
    }

    //查询工序
    @Override
    public List<String> quryProces() {
        return this.baseMapper.quryProces();
    }

    //查询产品编号
    @Override
    public List<String> queryProductNumber() {
        return this.baseMapper.queryProductNumber();
    }

    //查询产品名称
    @Override
    public List<String> queryProductName() {
        return this.baseMapper.queryProductName();
    }
}
